diff -Naur HandBrake-1.5.1/libhb/module.defs HandBrake-1.5.1.patched/libhb/module.defs
--- HandBrake-1.5.1/libhb/module.defs	2022-01-10 14:11:37.000000000 -0500
+++ HandBrake-1.5.1.patched/libhb/module.defs	2022-03-24 15:57:45.803548141 -0400
@@ -129,10 +129,6 @@
 LIBHB.dll.libs += $(CONTRIB.build/)lib/libvpl.a
 endif
 
-ifeq (1,$(FEATURE.x265))
-LIBHB.dll.libs += $(CONTRIB.build/)lib/libx265.a
-endif
-
 ifneq ($(HAS.iconv),1)
 LIBHB.dll.libs += $(CONTRIB.build/)lib/libiconv.a
 else
diff -Naur HandBrake-1.5.1/make/include/main.defs HandBrake-1.5.1.patched/make/include/main.defs
--- HandBrake-1.5.1/make/include/main.defs	2022-01-10 14:11:37.000000000 -0500
+++ HandBrake-1.5.1.patched/make/include/main.defs	2022-03-24 15:58:28.972263692 -0400
@@ -40,13 +40,6 @@
     MODULES += contrib/fdk-aac
 endif
 
-ifeq (1,$(FEATURE.x265))
-    MODULES += contrib/x265
-    MODULES += contrib/x265_8bit
-    MODULES += contrib/x265_10bit
-    MODULES += contrib/x265_12bit
-endif
-
 MODULES += contrib/libdav1d
 MODULES += contrib/zimg
 MODULES += contrib/ffmpeg
diff -Naur HandBrake-1.5.1/test/module.defs HandBrake-1.5.1.patched/test/module.defs
--- HandBrake-1.5.1/test/module.defs	2022-01-10 14:11:37.000000000 -0500
+++ HandBrake-1.5.1.patched/test/module.defs	2022-03-24 15:59:19.957108790 -0400
@@ -23,6 +23,10 @@
     TEST.GCC.l += fontconfig
 endif
 
+ifeq (1,$(FEATURE.x265))
+    TEST.GCC.l += x265
+endif
+
 ifeq (1,$(FEATURE.qsv))
     TEST.GCC.l += vpl
 ifneq (,$(filter $(HOST.system),linux freebsd))
